\hypertarget{class_mix_file}{
\section{MixFile Class Reference}
\label{class_mix_file}\index{MixFile@{MixFile}}
}


mix file controller  




{\ttfamily \#include $<$mix\_\-file.h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_mix_file_ac88416ea295349a8c834011520359599}{
{\bfseries MixFile} (const \hyperlink{class_mix_file}{MixFile} \&orig)}
\label{class_mix_file_ac88416ea295349a8c834011520359599}

\item 
bool \hyperlink{class_mix_file_a34cecccdab75e6533ed3cec0aaa1eae1}{open} (const std::string path)
\begin{DoxyCompactList}\small\item\em open mix archive \end{DoxyCompactList}\item 
bool \hyperlink{class_mix_file_a458c3723fe0f985a61e2063568f872fb}{extractFile} (unsigned int fileID, std::string outPath)
\begin{DoxyCompactList}\small\item\em extract file from mix archive \end{DoxyCompactList}\item 
bool \hyperlink{class_mix_file_a05fa448bc3507d58b85cfa3831c2f3b2}{extractFile} (std::string fileName, std::string outPath)
\begin{DoxyCompactList}\small\item\em extract file from mix archive \end{DoxyCompactList}\item 
bool \hyperlink{class_mix_file_a2016aa142da853224c86ef7aa17ef657}{extractAll} (std::string outPath=\char`\"{}.\char`\"{}, bool withFileNames=true)
\begin{DoxyCompactList}\small\item\em extract all files from the archive \end{DoxyCompactList}\item 
bool \hyperlink{class_mix_file_aa3c889a76f66b8508d38d63ccba3412b}{checkFileName} (std::string fname)
\begin{DoxyCompactList}\small\item\em chcecks, if file is present in the archive \end{DoxyCompactList}\item 
std::string \hyperlink{class_mix_file_affce142f06eb96c8e677a174b584f08c}{printFileList} (int flags)
\begin{DoxyCompactList}\small\item\em mix archive header \end{DoxyCompactList}\item 
unsigned int \hyperlink{class_mix_file_ab93f997c8a613ba0bee8a3d9a28de01b}{getID} (t\_\-game game, std::string name)
\begin{DoxyCompactList}\small\item\em count CRC ID from filename \end{DoxyCompactList}\item 
\hypertarget{class_mix_file_ad8c1782e1f48f5c376df06775b95ed6c}{
std::vector$<$ std::string $>$ {\bfseries getFileNames} ()}
\label{class_mix_file_ad8c1782e1f48f5c376df06775b95ed6c}

\item 
\hypertarget{class_mix_file_ac2dba1a5450c5f16b3364fb369366d67}{
std::vector$<$ \hyperlink{structt__mix__index__entry}{t\_\-mix\_\-index\_\-entry} $>$ {\bfseries getFileIndex} ()}
\label{class_mix_file_ac2dba1a5450c5f16b3364fb369366d67}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
mix file controller 

Some parts of code and code are taken from XCC mix file specification. \begin{DoxySeeAlso}{See also}
TS mix file format specification (\href{http://xhp.xwis.net/documents/MIX_Format.html}{\tt http://xhp.xwis.net/documents/MIX\_\-Format.html}) 
\end{DoxySeeAlso}


\subsection{Member Function Documentation}
\hypertarget{class_mix_file_aa3c889a76f66b8508d38d63ccba3412b}{
\index{MixFile@{MixFile}!checkFileName@{checkFileName}}
\index{checkFileName@{checkFileName}!MixFile@{MixFile}}
\subsubsection[{checkFileName}]{\setlength{\rightskip}{0pt plus 5cm}bool MixFile::checkFileName (
\begin{DoxyParamCaption}
\item[{std::string}]{fname}
\end{DoxyParamCaption}
)}}
\label{class_mix_file_aa3c889a76f66b8508d38d63ccba3412b}


chcecks, if file is present in the archive 


\begin{DoxyParams}{Parameters}
{\em fname} & file name \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if present 
\end{DoxyReturn}
\hypertarget{class_mix_file_a2016aa142da853224c86ef7aa17ef657}{
\index{MixFile@{MixFile}!extractAll@{extractAll}}
\index{extractAll@{extractAll}!MixFile@{MixFile}}
\subsubsection[{extractAll}]{\setlength{\rightskip}{0pt plus 5cm}bool MixFile::extractAll (
\begin{DoxyParamCaption}
\item[{std::string}]{outPath = {\ttfamily \char`\"{}.\char`\"{}}, }
\item[{bool}]{withFileNames = {\ttfamily true}}
\end{DoxyParamCaption}
)}}
\label{class_mix_file_a2016aa142da853224c86ef7aa17ef657}


extract all files from the archive 


\begin{DoxyParams}{Parameters}
{\em outPath} & output directory \\
\hline
{\em withFileNames} & try to get file names of the content \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if extraction successful 
\end{DoxyReturn}
\hypertarget{class_mix_file_a458c3723fe0f985a61e2063568f872fb}{
\index{MixFile@{MixFile}!extractFile@{extractFile}}
\index{extractFile@{extractFile}!MixFile@{MixFile}}
\subsubsection[{extractFile}]{\setlength{\rightskip}{0pt plus 5cm}bool MixFile::extractFile (
\begin{DoxyParamCaption}
\item[{unsigned int}]{fileID, }
\item[{std::string}]{outPath}
\end{DoxyParamCaption}
)}}
\label{class_mix_file_a458c3723fe0f985a61e2063568f872fb}


extract file from mix archive 


\begin{DoxyParams}{Parameters}
{\em fileID} & CRC ID of file \\
\hline
{\em outPath} & extracted file path \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em true} & file extracted \\
\hline
{\em false} & file not present in the archive \\
\hline
\end{DoxyRetVals}
\hypertarget{class_mix_file_a05fa448bc3507d58b85cfa3831c2f3b2}{
\index{MixFile@{MixFile}!extractFile@{extractFile}}
\index{extractFile@{extractFile}!MixFile@{MixFile}}
\subsubsection[{extractFile}]{\setlength{\rightskip}{0pt plus 5cm}bool MixFile::extractFile (
\begin{DoxyParamCaption}
\item[{std::string}]{fileName, }
\item[{std::string}]{outPath}
\end{DoxyParamCaption}
)}}
\label{class_mix_file_a05fa448bc3507d58b85cfa3831c2f3b2}


extract file from mix archive 


\begin{DoxyParams}{Parameters}
{\em fileName} & name of file \\
\hline
{\em outPath} & extracted file path \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em true} & file extracted \\
\hline
{\em false} & file not present in the archive \\
\hline
\end{DoxyRetVals}
\hypertarget{class_mix_file_ab93f997c8a613ba0bee8a3d9a28de01b}{
\index{MixFile@{MixFile}!getID@{getID}}
\index{getID@{getID}!MixFile@{MixFile}}
\subsubsection[{getID}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MixFile::getID (
\begin{DoxyParamCaption}
\item[{t\_\-game}]{game, }
\item[{std::string}]{name}
\end{DoxyParamCaption}
)}}
\label{class_mix_file_ab93f997c8a613ba0bee8a3d9a28de01b}


count CRC ID from filename 


\begin{DoxyParams}{Parameters}
{\em game} & t\_\-game game selection \\
\hline
{\em name} & filename \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
CRC ID of file 
\end{DoxyReturn}
\hypertarget{class_mix_file_a34cecccdab75e6533ed3cec0aaa1eae1}{
\index{MixFile@{MixFile}!open@{open}}
\index{open@{open}!MixFile@{MixFile}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool MixFile::open (
\begin{DoxyParamCaption}
\item[{const std::string}]{path}
\end{DoxyParamCaption}
)}}
\label{class_mix_file_a34cecccdab75e6533ed3cec0aaa1eae1}


open mix archive 


\begin{DoxyParams}{Parameters}
{\em path} & mix file path \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em true} & file opened \\
\hline
{\em false} & file not found \\
\hline
\end{DoxyRetVals}
\hypertarget{class_mix_file_affce142f06eb96c8e677a174b584f08c}{
\index{MixFile@{MixFile}!printFileList@{printFileList}}
\index{printFileList@{printFileList}!MixFile@{MixFile}}
\subsubsection[{printFileList}]{\setlength{\rightskip}{0pt plus 5cm}string MixFile::printFileList (
\begin{DoxyParamCaption}
\item[{int}]{flags = {\ttfamily 1}}
\end{DoxyParamCaption}
)}}
\label{class_mix_file_affce142f06eb96c8e677a174b584f08c}


mix archive header 

Prints header in following format: file CRC (hex) $|$$|$ file offset (dec) $|$$|$ file size (dec) 
\begin{DoxyParams}{Parameters}
{\em flags} & print settings \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
file text list 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
src/mix\_\-file.h\item 
src/mix\_\-file.cpp\end{DoxyCompactItemize}
